// 登录
function login() {
  console.log("dv")
  let tel = $('#TPL_username').val()
  let password = $('#TPL_password').val()
  let tel_ =localStorage.getItem("tel")
  let password_ = localStorage.getItem("password")
  if (!tel_ || !password_) {
    alert("您还没有注册")
    // sessionStorage.setItem("tel", tel);
    // sessionStorage.setItem("password", password);
    // window.location.href = "../views/login.html"
  } else if (tel != tel_){
    alert("当前用户不存在，请注册")

  } else if (tel == tel_ && password != password_){
    alert("密码错误")

  } else if (tel == tel_ && password == password_){
    window.location.href="./index.html"
	localStorage.setItem("logintype",true)
  }
}
